<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:ez="http://java.sun.com/jsf/composite/ezcomp"> 
    <!--
    Author Lu Xiaodi
    -->
    <h:head> 
        <title>IOTR</title> 

        <style type="text/css"> 

            .gritter-notice-wrapper { 
                left:200px; 
                top:50px; 
            } 
        </style> 

    </h:head> 
    <h:body>                 
        <ez:OutletManagerIOTRHeaderMenu/> 

        <ez:OutletManagerIOTRTitle/>

        <ez:OutletManagerIOTRMenu/>

        <p:layout style="table-layout:auto; height:600px ">
            <p:layoutUnit position="left" header="Navigation" width="300">
                <ez:OutletManagerIOTRRMMenu/>
            </p:layoutUnit>
            <p:layoutUnit id="center" position="center" header="Settings">
                <h:form id="form1">
                    <h:panelGrid columns="4">
                        <h:outputLabel for="noShowPenalty" value="No-show Fee: "/>
                        <p:inputText required="true" requiredMessage="no show fee amount required"
                                     id="noShowPenalty" value="#{outletManagerIOTRManagedBean.noShowPenalty}"/>
                        <h:outputLabel/>
                        <p:message for="noShowPenalty"/>

                        <h:outputLabel for="confirmation" value="Confirmaion: "/>
                        <h:selectOneRadio id="confirmation" value="#{outletManagerIOTRManagedBean.autoConfirmReservation}">
                            <f:selectItem id="auto" itemLabel="automatic" itemValue="true"/>
                            <f:selectItem id="manual" itemLabel="manual" itemValue="false"/>
                        </h:selectOneRadio>
                        <p:message for="confirmation"/>
                        <h:outputLabel/>

                        <h:outputLabel for="leadTime_Day" value="Lead Time: "/>
                        <p:inputText required="true" requiredMessage="lead time needed!" id="leadTime_Day"
                                     value="#{outletManagerIOTRManagedBean.leadTime_Day}">
                            <f:validateRegex pattern="\d+"/>
                        </p:inputText>
                        <h:outputLabel for="leadTime_Day" value="Days" />
                        <p:message for="leadTime_Day"/>

                        <h:outputLabel for="bookingWindow" value="Reservation Window: "/>
                        <p:inputText required="true" requiredMessage="reservation window needed!" id="bookingWindow"
                                     value="#{outletManagerIOTRManagedBean.bookingWindow}">
                            <f:validateRegex pattern="\d+"/>
                        </p:inputText>
                        <h:outputLabel for="bookingWindow" value="Days" />
                        <p:message for="bookingWindow"/>

                    </h:panelGrid> 
                        <p:commandButton id="updateGeneralInfo" value="Update" ajax="false" update="display"
                                         actionListener="#{outletManagerIOTRManagedBean.saveNewGeneralInfo}" />
                </h:form>
                <br/>
                <br/>
                <h:outputText style="font-weight: bold" value="Status Message: "/>
                <h:outputText value="#{outletManagerIOTRManagedBean.statusMessage}"/>
            </p:layoutUnit>
            
        </p:layout>

    </h:body> 
</html>